1. Field
This application relates generally to computer graphics, and more specifically to computer systems and processes for determining desired point area of a point used in point-based global illumination.
2. Related Art
Rendered images used in high-quality motion pictures need to be photorealistic. Global illumination is a technique used in computer graphics to add more realistic lighting to the scenes. Global illumination takes into account not only the light that comes directly from the light sources placed in the scene (direct illumination), but also light rays that are reflected by other surfaces in the scene (indirect illumination). For example, with direct illumination alone, shadows appear black, because there is no direct illumination in the shadowed areas. By contrast, global illumination allows light to bounce about in the scene before it is finally reflected towards the virtual camera. As a result, details in the shadowed areas may be seen as well.
Diffuse inter-reflection and caustics are two important components of global illumination. The simulation of diffuse inter-reflection includes simulating light reflecting off non-shiny surfaces such as the ground, walls, or fabric, to reach areas not directly in view of a light source. The simulation of a caustic includes the simulation of an envelope of light rays reflected or refracted by a curved surface or object.
Traditionally, global illumination is computed using a technique known as the Monte-Carlo ray tracing approach (also known as distributed ray tracing). (See Jaroslav Krivanek, Pascal Gautron, Greg Ward, Henrik Wann Jensen, Eric Tabellion, Per H. Christensen, “Practical global illumination with irradiance caching,” ACM SIGGRAPH 2008 class, Los Angeles (August 2008).) Global illumination may also be computed using an approach known as the point-based global illumination (PBGI) approach. (See Per H. Christensen, “Point-based approximate color bleeding,” Pixar Technical Memo #08-01 (July, 2008); hereinafter referred to as Christensen 2008.)
PBGI involves solving for the indirect illumination integrals and occlusion integrals. Before these integrals are solved, the directly illuminated geometry in the scene is represented by a point cloud representation, which is generated in a pre-computation phase prior to the rendering of the scene.
A point in a point cloud is a data representation of a surfel, which is a small circular disk-shaped surface element making up the different objects within a scene. As described in Christensen 2008, the surfaces of different objects are subdivided into small micropolygons, and the color reflected from each micropolygon is stored in a point. A point can also store other information, including a position, a surface normal, an effective area, a point-radius, and the like. As described in Christensen 2008, the effective area and the point-radius stored in a point are not the same thing; rather, they are two different representations of the size of the point. The point-radius circumscribes the micropolygon that the point represents. This ensures that the surfaces are completely covered by the points with no gaps in between. The effective area is the point's real area, which is smaller than the area corresponding to the point-radius.
To efficiently solve the illumination integrals with PBGI, the generated point cloud is further organized into a multi-resolution level-of-detail hierarchy. For example, an octree data structure may be used to partition the three dimensional space represented by a point cloud by recursively subdividing the space into eight octants. Leaf nodes in the octree store the individual points. Each node other than a leaf node is a point cluster, which is an approximation of a collection of points situated within a particular volume. For example, a point cluster representation includes an average position for the cluster, as well as the projected area and emitted power when the cluster is viewed from various directions (the directional projected area and directional emitted power, respectively).
After generating the octree hierarchy, both the full point cloud and the octree hierarchy may then be used to compute the indirect illumination integrals and occlusion integrals at all the “shading locations” seen from the virtual camera. However, not all the nodes of the octree are necessary for computing the integrals at a particular shading location. For example, when an object is far away, less refined nodes of the octree may be used for calculating the various integrals. When an object is close by, more refined nodes or even individual points may be used. However, using more refined nodes for computing the integrals translates to longer shading time.
A cut picking algorithm is an algorithm used to determine a subset of nodes of the octree for computing the integrals at a particular shading location. The algorithm takes as input a user-specified solid angle (i.e., a two-dimensional angle in three-dimensional space that an object subtends at a point of view), referred to as the “cut quality criterion solid angle”. The algorithm compares this “cut quality criterion solid angle” with the point cluster solid angle to determine whether the point cluster (less refined) or its children (more refined) should be used. In particular, the point cluster solid angle is the subtended solid angle of the cluster when looked at from the point of view of the current shading location. If this point cluster solid angle is larger than the “cut quality criterion solid angle,” the point cluster is removed from the cut and replaced by its child nodes in the octree. This cut picking algorithm iterates until all nodes on the cut satisfy the cut picking criterion. After the cut picking algorithm has been applied, the clusters and points on the cut may then be used as the appropriate geometric representations of the scene for solving the integrals.
It should be recognized that the “cut quality criterion solid angle” is measured in steradians, and its magnitude can be traded off for render time. The render time increases as the “cut quality criterion solid angle” becomes smaller. In general, a smaller cluster area may be needed for closer objects, whereas a larger cluster area may be acceptable for objects further away. Using a solid angle measured in steradians as the cut quality criterion will achieve this result.
The octree clustering technique described above reduces the complexity of solving the actual integrals significantly. Nevertheless, the amount of execution time required by the algorithm used to build the octree clustering and the amount of memory required to store the aforementioned data structures each has a complexity order of O(n), where n is the number of input points. Therefore, the point count has an impact on the overall performance of the pre-processing algorithm and on the memory requirement for PBGI. Reducing the number of points is thus advantageous. Furthermore, in order to handle the large point counts necessary to represent most scenes, some implementations rely on out-of-core pre-processing and accessing of data structures. As a result, the amount of Input/Output (I/O) performed may be reduced by reducing the number of points as well.
In some PBGI implementations, points are only generated inside the camera frustum and any objects outside the camera frustum are discarded. As a result, a user has to place an alternate distant virtual camera with a camera frustum encompassing the scene to include all the objects that are out-of-view from the main rendering camera, in order to account for occlusion or indirect illumination coming from these objects.
Placing an alternate distant virtual camera has two negative side-effects. First, the objects that are in-view with reference to the main rendering camera no longer receive a point density with point areas that are proportional to the pixels of the final rendered image, since an alternate camera is used to evaluate the required point area and density. This requires the user to manually adjust the desired point density, and achieves an unnecessarily high point density for objects that are in-view and far from the main rendering camera. The second problem is that objects that are out-of view with reference to the main rendering camera have an unnecessarily high point density when compared to the required fidelity imposed on distant objects by the cut-quality criterion of the cut picking algorithm described above.